import React, { useState, useEffect } from 'react';
import { Button } from 'antd';
import styles from './index.less';
import { exportExcel } from 'xlsx-oc';

export default class extends React.Component {
  // 导出表哥
  exportDefaultExcel = () => {
    var enUs = {
      header: {
        home: 'Home',
        root: 'Root',
        stake: 'Stake',
        stake_lp: 'Stake LP',
        stake_eps: 'Stake + Vest',
        stake_rewards: 'Rewards',
        dao: 'DAO',
        claim: 'Claim',
        airdrop: 'Airdrop',
        risks: 'Risks',
        audit: 'Audit',
        deposit: 'Deposit',
        withdraw: 'Withdraw',
        buy_sell: 'Buy and sell',
        connect_wallet: 'Connect to Wallet',
        sun_swap: 'SUN Swap',
        century_mining: 'Century Mining',
        toast: 'SUN Redenomination and Upgrade Plan',
        learn_more: 'Learn More',
        toast2: 'SUN Swap Is Now Released',
      },
      login_modal: {
        tronlink: 'TronLink Wallet',
        no_tronlink_tip: {
          tip1: "Haven't installed TronLink yet?",
          tip2: 'Click here>>',
        },
        initializing: 'Initializing...',
        login_tips:
          "Please login to your  <a href='https://chrome.google.com/webstore/detail/tronlink%EF%BC%88%E6%B3%A2%E5%AE%9D%E9%92%B1%E5%8C%85%EF%BC%89/ibnejdfjmmkpcnlpebklmnkoeoihofec'>TronLink wallet</a> to connect",
      },
      account_modal: {
        account: 'Account',
        connect_with_tronlink: 'Connected with Tronlink',
        recent_actions_title: 'Recent Transactions',
        no_transactions_tips: 'Your transactions will appear here.',
        copy: 'Copy',
        balance: 'SUN Balance',
        coming_soon: 'Coming soon...',
      },
      copy_text: 'Copied',
      menu: {
        pools: 'Pools',
        trade: 'Trade',
        all_stats: 'All stats',
        daily_stats: 'Daily stats',
        coin_volumes: 'Coin volumes',
        analytics: 'Dune Analytics',
      },
      view_on_tronscan: 'View on TRONSCAN',
      trans_modal: {
        wait_confirm: 'Waiting for your confirmation',
        confirm_wallet: 'Please confirm in your wallet',
        submitted: 'Transaction Submitted',
        cancelled: 'Transaction Cancelled',
        submit: 'Transaction has been broadcast',
        failed: 'Transaction Failed',
        failed_tips: 'Please check the transaction information and try again',
      },
      toast: {
        deposit: 'Supply',
        withdraw: 'Withdraw',
        borrow: 'Borrow',
        repay: 'Repay',
        mortgage: 'Collateral',
        cancelmortgage: 'Remove Collateral',
        vote: 'Vote',
        swap: 'Get Votes',
        redemption: 'Revoke',
        approve: 'Approve',
        open: 'Enabling {value} as collateral',
        close: 'Disabling {value} as collateral',
        open_failed: 'Failed to enable {value} as collateral',
        close_failed: 'Failed to disable {value} as collateral',
        ex: 'Confirming the transaction',
        ex_failed: 'Failed to confirm the transaction',
        faild_reason:
          'Possible causes of failure: <br>· Insufficient Energy or bandwidth, or insufficient TRX balance<br>· Internet error<br>· System time is not correctly set on the device',
        warning_tip:
          'Important reminder: jToken (e.g. jTRX, jUSDT) is an important receipt for your supplied asset. Please think twice before transferring jTOKEN to a third party!',
        warning_tip_more: 'Learn more',
      },
      trans_status: {
        pending: 'Pending',
        confirmed: 'Confirmed',
        failed: 'Failed',
      },
      footer: {
        twitter: '#Twitter',
        telegram: '@Telegram',
        medium: '#Medium',
        github: '#GitHub',
        docs: '#Docs',
        contracts: '#Contracts',
        wechat: '@Wechat',
        help_center: 'Help Center',
        pool_contract: 'Pool Contract',
        token_contract: 'Token Contract',
      },
      error: {
        tip1:
          'Error: wrong network type. Please switch to Binance Smart Chain mainnet.',
        tip2: 'Follow this guide to connect to the right network!',
        not_enough: 'Not enough balance for {value}. Swap is not available.',
        e1: 'Invalid input value',
        e2: 'Insufficient {token} balance',
        e3: 'Share of liquidity should not be greater than 100%',
        e4: 'Invalid withdrawl token amount',
        e5: 'Custom slippage ranges between [0.1%, 50%]',
      },
      home: {
        swap_all_title: 'Swap Stablecoin',
        pools_title: 'SUN pools',
        volume_title: 'Total pool deposits and daily volume',
        stakeLP_title: 'Stake LP Tokens',
        stakeSSP_title: 'Stake SUN',
        stats_title: 'SUN Stats',
        pools: {
          pool: 'Pool',
          base_apy: 'Base APY',
          rewards_apy: 'Rewards APY',
          volume: 'Volume',
        },
        volume: {
          deposits: 'Deposits: ',
          daily_volume: 'Daily volume: ',
        },
        stake_apy: {
          jstlp: 'JST-TRX Staking APY: ',
          sunlp: 'SUN-TRX Staking APY: ',
          thrpoollp: '3Pool LP Token APY: ',
          unlocked: 'Unlocked APY: {unlockedValue} in TUSD',
          locked: 'Locked APY: {lockedValue} in SUN + {unlockedValue} in TUSD',
          trx_locked: 'TRX Locked APY: {lockedValue} in SUN',
          lp_button: 'Stake LP Tokens',
          stake_sun_button: 'Stake SUN',
          lock_trx_button: 'Lock TRX',
        },
        ssp_stats: {
          price: 'SUN Price: ',
          supply: 'SUN Supply: ',
          locked: 'SUN Supply Locked: ',
          marketcap: 'SUN Marketcap: ',
          address: 'SUN Address: ',
          total_deposits: 'Total Deposits: ',
        },
      },
      buysell: {
        exchange_rate: 'Exchange rate',
        not_available: 'not available',
        including_fees: 'including fees',
        max: 'Max',
        from: 'From',
        to: 'To',
        advanced_options: 'Advanced options',
        max_slippage: 'Max slippage',
        gas_price: 'Gas price',
        currency_reserves: 'Currency reserves',
        fee: 'Fee',
        admin_fee: 'Admin fee',
        virtual_price: 'Virtual price',
        liquidity_utilization: 'Liquidity utilization',
        daily_volume: 'Daily USD volume',
        trade_through: 'Trade routed through:',
        error_msg_1: 'The input must be larger than 0.',
        error_msg_2: 'The input cannot exceed the maximum balance.',
        error_msg_3: 'Please connect a wallet.',
        error_msg_4: 'Custom slippage ranges between [0.1, 50].',
      },
      stake: {
        header: 'Stake your LP tokens below and start earning',
        titles: {
          jst: 'JST-TRX Staking',
        },
        tip: 'Stake your LP tokens below and start earning',
        deposit: 'Deposit',
        available_balance: 'Available Balance',
        staked_balance: 'Staked Balance',
        apy: 'APY',
        add_liquidity: 'Add liquidity on PancakeSwap',
        eps_staking: 'SUN/TRX Staking',
        pool_token: '3Pool LP Token',
        fusdt_token: 'fUSDT LP Token',
        withdraw: 'Withdraw',
        vest: 'Vest',
        staking: 'Staking',
        justswap: 'Add ilquidity on JustSwap',
        inSUN: 'in SUN',
        inAPY: 'in TUSD',
        totalStaked: 'Total Staked',
        daolink_1: '当前LP矿池产出权重',
        daolink_2: '前往DAO了解更多>>',
        tip_2:
          'The SUN mined by staking LP tokens cannot be directly claimed to the user’s wallet and needs to be vested first. You can see the vesting SUN on the "Rewards" page.',
      },
      deposit: {
        currencies: 'Currencies',
        token_max: 'Max: {balance}',
        ch1: 'Add all coins in a balanced proportion',
        ch2: 'Use maximum amount of coins available',
        action: 'Deposit',
        risk: 'Risks of using 3pool pool',
        slippage: 'Slippage(incl. pricing): {value}%',
        bonus_slippage: 'Bonus (incl. pricing): {value}%',
        high_slippage: 'Warning! High slippage(incl. pricing): {value}%',
        high_slippage_title: 'High slippage!',
        tip:
          'Slippage comes from depositing too many coins not in balance, and current coin prices are additionally accounted for',
        deposit: 'Supply',
        withdraw: 'Withdraw',
        explanation1:
          'You need to approve before supply or repay {value} to smart contracts.',
        wallet_balance: 'Wallet Balance',
        depositapy: 'Supply APY',
        confirm_approve: 'Approval Confirmation',
        approve_token: 'Approve {value}',
        explanation2: 'Need your approval from the wallet',
        enteramount: 'Enter the supply amount',
        max: 'Max',
        Loanlimit: 'Borrow Limit',
        limitused: 'Borrow Limit Used',
        deposited: 'Supplied',
        confirm_transaction: 'Transaction Confirmation',
        explanation3: 'Transaction confirmation failed in the wallet',
        transactionsent: 'Transaction Sent',
        explanation4: 'Transaction sent, waiting for confirmation on-chain',
        closed: 'Close',
        amountout: 'Insufficient wallet balance',
        enteramount2: 'Enter the supply amount',
        swap_detail: "You'll receive minimum {value}  3pool LP tokens",
        sub_text: '1.00% max slippage',
        exchange_rate: '1 3pool LP token = {value} USD',
        high_tip1: 'High slippage warning!',
        high_tip2: 'Depositing will have {value}% slippage!',
        confirm_slippage: 'Confirm {value}% slippage!',
        anyway: 'Deposit anyway',
        bonus_tip:
          'Bonus comes as an advantage from current coin prices which usually appears for coins which are low in balance',
        bonus_tip_withdraw:
          'Bonus comes as an advantage from current coin prices which usually appears for coins which are high in balance',
      },
      pool: {
        cur_reserve: 'Currency reserves',
        fee: 'Fee: {value}%',
        admin_fee: 'Admin fee: {value1}% of {value2}%',
        virtual_price: 'Virtual price: {value}',
        liq_uti: 'Liquidity utilization: {value}%',
        my_share: 'My share:',
        of_pool: '{value}% of pool',
        d_usd_volume: 'Daily USD volume: {value}',
        usd_balance: 'USD balance:',
        avg_usd_balance: 'Averaged USD balance:',
        v_tip: 'Average dollar value of pool token',
      },
      withdraw: {
        share_of_liq: 'Share of liquidity (%)',
        withdraw_text: 'Withdraw % in',
        action: 'Withdraw',
        tip: 'You can also withdraw in one coin by typing in a currency field',
        slippage: 'Max slippage:',
      },
      claim: {
        error:
          'Error: wrong network type. Please switch to Binance Smart Chain mainnet.',
        button: 'Connect to the Binance Smart Chain network',
        claim_text: 'Claim your veCRV airdrop {value} Week',
        check_text: 'Check',
        address_text: 'address',
        tron_address: 'TRON Address',
        eth_address: 'Ethereum Address',
        claim_btn: 'Claim',
        table: {
          title: 'Claim Stats',
          week_text: 'Week#',
          total_text: 'Total Claimed',
          amount_text: 'Amount Claimed',
          percent: 'Claimed%',
        },
        desc: {
          content_1:
            'In the spirit of cooperation with Curve Finance, we grant Curve DAO members rights to the SUN platform and will airdrop SUN to veCRV holders;',
          content_2:
            'Airdrop will be executed for 52 weeks and SUN will be allocated according to your veCRV holding at the moment of airdrop;',
          content_3:
            "We will airdrop SUN to veCRV holders' TRON addresses generated from their private keys.",
          content_4: 'Steps:',
          content_5:
            "Confirm at <a href='https://curve.fi/usecrv' target='_blank'>https://curve.fi/usecrv</a> to see if you hold veCRV in your Ethereum wallet;",
          content_6:
            'Import your Ethereum address with veCRVn to TronLink wallet or other wallets that support TRON network to generate TRON address;',
          content_7:
            'Claim your SUN airdrops using the wallet address from Step 2 on the SUN platform.',
        },
        messages: {
          nothing: 'You have nothing to claim :(',
          claimed: 'Already claimed!',
          claim: 'You have {value} {symbol} to claim.',
          clickCheck: '请先点击查看按钮',
          address: '请输入正确的波场地址',
        },
      },
      actions: {
        addLiq: 'Add Liquidity<br> {detail}',
        remove: 'Remove Liquidity<br> {detail}',
        stake: 'Stake',
        withdraw: 'Withdraw',
        claim: 'Claim',
        stake_lp: 'Stake {value} {symbol}',
        withdraw_lp: 'Withdraw {value} {symbol}',
        claim_lp: 'Claim {value} {symbol}',
        vest_lp: 'Vest {value} {symbol}',
        claim_all: 'Claim {value1} {symbol1} and {value2} {symbol2}',
        lock_lp: 'Stake and Lock {value} {symbol}',
      },
      stakeeps: {
        info:
          'Stake your tokens below and start earning fees and penalty fees. Your vesting SUN is locked below.',
        tokens: {
          title: 'Your Tokens',
          sub_title: 'Your SUN',
          sub_title_ssp: 'Stake and Lock SUN',
          expired_token: 'Your expired token(s)',
          available_withdraw: 'Available to withdraw',
          available_withdraw_without_penalty:
            'Available to withdraw without penalty',
          claim_text: 'Claim',
          reward_text: 'Rewards',
          early_exit: 'with an early exit penalty of',
          claim_available: 'Claim available',
          claim_with_penalty: 'Claim all with penalty',
          tip_1: 'Your SUN include',
          tip_2: '① Vesting SUN',
          tip_3: '② Staking SUN(Without lock-up)',
          tip_4: '③ Expried SUN',
          tip_5: 'Rewards include',
          tip_6: '① Rewards from Stake and Lock SUN Pool',
          tip_7: '② Rewards from Stake SUN Pool',
          tip_8: '③ Rewards from Vesting SUN',
        },
        desc: {
          title: 'About Vests and Locks',
          content_1:
            'SUN earned from staking LP can be vested to earn TUSD rewards;',
          content_2:
            'Where these SUN tokens will be vested for 2 months, and early exit will result in a 50% penalty;',
          content_3:
            'Besides earning TUSD rewards, users who stake and lock SUN can also earn and claim any penalty incurred above at any time;',
          content_4:
            'The cycle is 7 days based on UTC+0 time zone, the vesting or unlocking in the same cycle will expire at the same time.',
          content_5:
            'You must have locked SUN below to receive exit penalties from others;',
          content_6: 'SUN earned by locking SUN below is not locked.',
        },
        vesting_table: {
          title: 'Vesting SUN',
          amount: 'Amount',
          penalty: 'Early Exit Penalty',
          expiry: 'Expiry',
        },
        locked_table: {
          title: 'Locked SUN',
          amount: 'Amount',
          expiry: 'Expiry',
          header: 'Locked {symbol}',
        },
        lock: {
          title: 'Stake and Lock Pools',
          sub_title: 'Stake and Lock',
          sub_title_ssp: 'Stake and Lock SUN',
          deposit_text: 'Deposit',
          available_balance: 'Available Balance',
          desc: 'Earn staking and penalty fees (2 months lock)',
          claim_text: 'Claim',
        },
        stake: {
          header: 'Stake Pool (Without lock-up) ',
          title: 'Stake SUN',
          desc: 'Earn staking fees without lock-up',
          ssp_pool: 'SUN Pools',
          total_locked: 'Total Locked',
        },
        status: 'Vesting and Locked Tokens Stats',
      },
      sell_btn: 'Sell',
      cancel: 'Cancel',
      banner: {
        title_1: 'Swap',
        desc_1: 'Start your safe and low slippage stablecoin swap now',
        title_2: 'Stake and Earn',
        desc_2: 'Stake LP token and earn SUN at ease',
        title_3: 'DAO',
        desc_3: 'Lock TRX to earn penalty fees and vote for a LP pool',
        title_4: 'SUN Staking Pool',
        desc_4: 'Stake one currency and earn multi-rewards',
        title_5: 'Airdrop Plan',
        desc_5: 'veCRV holders can share SUN airdrops every week',
        title_6: '3pool Swap',
        title_home: 'SUN',
        desc_home:
          'First integrated platform for stablecoin swap, stake-mining and self-governance on TRON',
        title_deposit: 'Add Liquidity',
        desc_deposit:
          'Flexible operation, and generous proceeds from providing liquidity',
        title_withdraw: 'Remove Liquidity',
        desc_withdraw:
          'Quit at any time,and can choose multiple ways to withdraw tokens',
        audit1: 'SUN smart contract has been verified by SlowMist. ',
        audit2: 'Check out the audit report here.',
      },
      risks: {
        title_1: 'Risks of using SUN',
        content_1:
          "Providing liquidity on doesn't come without risks. Before making a deposit, it is best to research and understand the risks involved.",
        title_2: 'Audits',
        content_2_1: 'SUN smart contract has been verified by SlowMist.',
        content_2_2:
          "However, security audits don't eliminate risks completely. Please don’t supply your life savings, or assets you can’t afford to lose, to SUN, especially as a liquidity provider.",
        content_2_3:
          'Using SUN as an exchange user should be significantly less risky, but this is not advice.',
        title_3: 'Admin keys',
        content_3:
          'SUN is fully decentralized and admins have no access to funds.',
        title_4: 'Permanent loss of a peg',
        content_4:
          "If one of the stablecoins in the pool goes significantly down below the peg of 1.0 and never returns to the peg, it'll effectively mean that pool liquidity providers hold almost all their liquidity in that currency.",
      },
      dao: {
        pool: {
          title: 'Weights of LP Pools',
          content_1:
            'Below are the weights of SUN output in current LP pools, which is calculated with the total number of votes received in each pool as of 24:00 (UTC+8) on Sunday of the previous week. Users can lock TRX in the action box below and vote to improve the weight of a certain pool while earning penalty fees in SUN. ',
          content_2:
            'Number of votes a user can receive by locking TRX = USD value of the TRX when locked * Number of TRX locked',
          content_3:
            'The weights of pools will be adjusted once a week. The votes cast by users this week will be counted towards the total votes at 0:00 (UTC+8) on Monday of the following week. The weight of the following week will then be calculated. ',
        },
        lockvote: {
          title: 'Lock TRX and Vote',
          subtitle: 'Vote for',
          tip:
            '当你锁定TRX时，可获得罚金奖励，同时将获得一定数量的选票（投票数量=TRX美元价值*锁仓TRX数量）。你可以选择以下LP中的任意一个进行投票，锁仓的同时会投出对应的选票数。',
          deposit_text: 'Deposit',
          lock_vote: 'Lock and Vote',
          available_balance: 'Available Balance',
        },
        table: {
          title: '矿池投票数据',
          total_lastweek: '上周总投票数',
          total: '累计总投票数（截止上周日）',
          pool_name: '矿池名称',
          total_amount: '累计投票数（截止上周日）',
          lastweek_amount: '上周投票数',
        },
      },
      notification: {
        tip1: 'Swap {fromValue} {fromToken} to {toValue} {toToken}',
      },
      daily_stats: {
        daily_apy: 'Daily APY % and trading volume',
        total_volume: 'Total trading volume',
        trading_fees: 'Trading fees',
      },
      volume_percoin: {
        last_week: 'Share of trading volume per coin for last week',
        total_volume: 'Total trading volume per day for {value}',
        select: 'Select',
      },
      century: {
        tip1: '<b>{value}X</b> Earn',
        h: 'HOURS',
        m: 'MINUTES',
        s: 'SECONDS',
      },
      countdown: {
        title: 'TRON Century Mining Coming Soon',
        desc: 'Join TRON Century Mining for a Fat TRON Gift Bag',
      },
    };
    var zhCn = {
      header: {
        home: '首页',
        root: '首页',
        stake: '质押',
        stake_lp: '质押 LP',
        stake_eps: '质押 + 转投',
        stake_rewards: '奖励',
        dao: 'DAO',
        claim: '领取',
        airdrop: '空投',
        risks: '风险',
        audit: '审计',
        deposit: '存款',
        withdraw: '提现',
        buy_sell: '买入和卖出',
        connect_wallet: '连接钱包',
        sun_swap: 'SUN兑换',
        century_mining: '世纪挖矿',
        toast: 'SUN 代币拆分 & SUN 平台升级计划',
        learn_more: '查看更多',
        toast2: 'SUN 兑换功能上线公告',
      },
      login_modal: {
        tronlink: 'TronLink 钱包',
        no_tronlink_tip: {
          tip1: '还没安装 TronLink？',
          tip2: '请点击此处>>',
        },
        initializing: '正在初始化...',
        login_tips:
          "请登录 <a href='https://chrome.google.com/webstore/detail/tronlink%EF%BC%88%E6%B3%A2%E5%AE%9D%E9%92%B1%E5%8C%85%EF%BC%89/ibnejdfjmmkpcnlpebklmnkoeoihofec'>TronLink 钱包</a> 进行连接",
      },
      account_modal: {
        account: '账户',
        connect_with_tronlink: 'Tronlink 钱包已连接',
        recent_actions_title: '近期交易',
        no_transactions_tips: '您的交易记录将会显示在这里。',
        copy: '复制',
        balance: 'SUN 余额',
        coming_soon: '即将发布...',
      },
      copy_text: '已复制',
      menu: {
        pools: '矿池',
        trade: '交易',
        all_stats: '全部数据',
        daily_stats: '每日数据',
        coin_volumes: '代币交易额',
        analytics: 'Dune Analytics 分析平台',
      },
      view_on_tronscan: '在Tronscan上查看',
      trans_modal: {
        wait_confirm: '等待确认',
        confirm_wallet: '请在钱包中确认',
        submitted: '交易已提交',
        cancelled: '交易已取消',
        submit: '交易已经广播',
        failed: '交易失败',
        failed_tips: '请检查交易信息，然后重试',
      },
      toast: {
        deposit: '提供',
        withdraw: '提现',
        borrow: '借款',
        repay: '偿还',
        mortgage: '质押物',
        cancelmortgage: '移除质押物',
        vote: '投票',
        swap: '获取投票',
        redemption: '撤消',
        approve: '批准',
        open: '开始质押 {value}',
        close: '解除质押 {value}',
        open_failed: '质押 {value} 失败',
        close_failed: '解除质押 {value} 失败',
        ex: '确认交易',
        ex_failed: '未能确认交易',
        faild_reason:
          '失败原因可能是：<br>Energy、bandwidth 或 TRX 余额不足<br>网络故障<br>设备系统时间设置错误',
        warning_tip:
          '重要提醒：jToken（如jTRX、jUSDT）是您所存入资产的重要收据。向第三方转账 jTOKEN 前请三思！',
        warning_tip_more: '了解更多',
      },
      trans_status: {
        pending: '待确认',
        confirmed: '已确认',
        failed: '失败',
      },
      footer: {
        twitter: '#Twitter',
        telegram: '@Telegram',
        medium: '#Medium',
        github: '#GitHub',
        docs: '#Docs',
        contracts: '#Contracts',
        wechat: '@微信',
        help_center: '帮助中心',
        pool_contract: '矿池合约',
        token_contract: '代币合约',
      },
      error: {
        tip1: '错误：错误网络类型。请转换到币安智能合约主网。',
        tip2: '请按照本指南连接至正确的网络！',
        not_enough: '{value} 余额不足。 不可进行兑换。',
        e1: '无效输入值',
        e2: '{token} 余额不足',
        e3: '流动性份额不能大于 100%',
        e4: '代币提现数额无效',
        e5: '自定义滑点区间应为[0.1%, 50%]',
      },
      home: {
        swap_all_title: '稳定币兑换',
        pools_title: 'SUN 兑换池',
        volume_title: '兑换池总存款量及每日交易额',
        stakeLP_title: '质押 LP 代币',
        stakeSSP_title: '质押 SUN',
        stats_title: 'SUN 数据',
        pools: {
          pool: '兑换池',
          base_apy: '基础 APY',
          rewards_apy: '奖励 APY',
          volume: '交易额',
        },
        volume: {
          deposits: '存款量：',
          daily_volume: '每日交易额：',
        },
        stake_apy: {
          jstlp: 'JST-TRX 质押 APY: ',
          sunlp: 'SUN-TRX 质押 APY: ',
          thrpoollp: '3Pool LP 代币 APY：',
          unlocked: '无锁定池 APY：{unlockedValue} (TUSD)',
          locked: '锁定池 APY：{lockedValue} (SUN) + {unlockedValue} (TUSD)',
          trx_locked: 'TRX 锁定池 APY: {lockedValue} (SUN)',
          lp_button: '质押 LP 代币',
          stake_sun_button: '质押 SUN',
          lock_trx_button: '锁定 TRX',
        },
        ssp_stats: {
          price: 'SUN 价格：',
          supply: 'SUN 提供量：',
          locked: 'SUN 提供量(锁定中)：',
          marketcap: 'SUN 市值：',
          address: 'SUN 地址：',
          total_deposits: '总存款量：',
        },
      },
      buysell: {
        exchange_rate: '汇率',
        not_available: '不可用',
        including_fees: '含手续费',
        max: '最大',
        from: '从',
        to: '至',
        advanced_options: '高级选项',
        max_slippage: '最大滑点',
        gas_price: '矿工费',
        currency_reserves: '货币储备',
        fee: '手续费',
        admin_fee: '管理费',
        virtual_price: '平均价格',
        liquidity_utilization: '流动性利用率',
        daily_volume: '每日美元交易额',
        trade_through: '兑换池：',
        error_msg_1: '输入值必须大于0',
        error_msg_2: '输入值不能大于最大余额',
        error_msg_3: '请连接钱包',
        error_msg_4: '自定义滑点区间应为[0.1, 50]',
      },
      stake: {
        header: '质押 LP 代币，开始赚取收益',
        titles: {
          jst: 'JST-TRX 质押',
        },
        tip: '质押 LP 代币，开始赚取收益',
        deposit: '存款',
        available_balance: '可用余额',
        staked_balance: '已质押余额',
        apy: 'APY',
        add_liquidity: '在 PancakeSwap 上添加流动性',
        eps_staking: 'SUN/TRX 质押',
        pool_token: '3Pool LP 代币',
        fusdt_token: 'fUSDT LP 代币',
        withdraw: '提现',
        vest: '转投',
        staking: '质押',
        justswap: '在 JustSwap 上添加流动性',
        inSUN: '(SUN)',
        inAPY: '(TUSD)',
        totalStaked: '总质押量',
        daolink_1: '当前LP矿池产出权重',
        daolink_2: '前往DAO了解更多>>',
        tip_2:
          '通过质押 LP 代币获得的SUN，无法直接领取到用户的钱包，需要先进行转投。您可以在“奖励”页面，看到你转投的SUN。',
      },
      deposit: {
        currencies: '币种',
        token_max: '最大值：{balance}',
        ch1: '等比例添加所有代币',
        ch2: '使用代币的最大可用数额',
        action: '存款',
        risk: '使用 3Pool 的风险',
        slippage: '滑点（含价格变动因素）：{value}%',
        bonus_slippage: '奖励（含价格变动因素）：{value}%',
        high_slippage: '注意！ 滑点较高（含价格变动因素）：{value}%',
        high_slippage_title: '滑点较高！',
        tip: '存入过多比例不均衡的代币会导致滑点（考虑当前代币价格）',
        deposit: '提供',
        withdraw: '提现',
        explanation1: '如需向智能合约提供或偿还 {value}，请先授权启用',
        wallet_balance: '钱包余额',
        depositapy: '存款 APY',
        confirm_approve: '确认授权',
        approve_token: '授权 {value}',
        explanation2: '需要在钱包中授权',
        enteramount: '输入提供数量',
        max: '最大',
        Loanlimit: '可借限额',
        limitused: '已用额度',
        deposited: '已提供',
        confirm_transaction: '确认交易',
        explanation3: '钱包确认交易失败',
        transactionsent: '交易已发送',
        explanation4: '交易已发送，等待链上确认',
        closed: '关闭',
        amountout: '钱包余额不足',
        enteramount2: '请输入提供数量',
        swap_detail: '您最少可获得 {value} 3pool LP 代币',
        sub_text: '最大滑点值 1.00%',
        exchange_rate: '1 3pool LP 代币 = {value} USD',
        high_tip1: '滑点较高！',
        high_tip2: '若充值，滑点将达 {value}%！',
        confirm_slippage: '确认滑点为 {value}%！',
        anyway: '仍然充值',
        bonus_tip: '奖励来源于当前币价优势，常见于储备量较低的代币',
        bonus_tip_withdraw: '奖励来源于当前币价优势，常见于储备量较高的代币。',
      },
      pool: {
        cur_reserve: '货币储备',
        fee: '费率: {value}%',
        admin_fee: '管理费率：{value2}% 的 {value1}%',
        virtual_price: '平均价格: {value}',
        liq_uti: '流动性利用率: {value}%',
        my_share: '我的份额:',
        of_pool: '资金池 {value}%',
        d_usd_volume: '每日美元交易额: {value}',
        usd_balance: '美元余额: ',
        avg_usd_balance: '美元平均余额: ',
        v_tip: '资金池代币的平均美元价值',
      },
      withdraw: {
        share_of_liq: '流动性份额（%）',
        withdraw_text: '提现为',
        action: '提现',
        tip: '您也可以选中某个代币进行提现',
        slippage: '最大滑点：',
      },
      claim: {
        error: '错误：错误网络类型。请切换到币安智能合约主网。',
        button: '接入币安智能合约网络',
        claim_text: '领取您的 veCRV 空投 第{value}周',
        check_text: '查看',
        address_text: '地址',
        tron_address: '波场地址',
        eth_address: '以太坊地址',
        claim_btn: '领取',
        table: {
          title: '空投领取信息',
          week_text: '周#',
          total_text: '领取地址数',
          amount_text: '领取总量',
          percent: '已领取%',
        },
        desc: {
          content_1:
            '本着与Curve Finance合作的精神，我们允许Curve DAO成员拥有SUN平台的权益，我们会将SUN通过空投的方式，分配给veCRV持有者；',
          content_2:
            '空投将会执行52周次，我们会根据您在空投时刻veCRV的持有额比例，进行SUN的发放；',
          content_3: '我们会空投至veCRV持有者的私钥生成的波场地址。',
          content_4: '具体操作方式如下：',
          content_5:
            "在 <a href='https://curve.fi/usecrv' target='_blank'>https://curve.fi/usecrv</a> 确认您的以太坊钱包是否持有veCRV；",
          content_6:
            '在TronLink钱包或支持波场网络的钱包中，将您持有veCRV的以太坊地址私钥导入，即可生成波场地址；',
          content_7: '在SUN平台中，用第2步得到的钱包地址领取您的SUN空投奖励。',
        },
        messages: {
          nothing: '暂无可领取奖励',
          claimed: '已领取',
          claim: '可领取 {value} {symbol} ',
          clickCheck: '请先点击查看按钮',
          address: '请输入正确的波场地址',
        },
      },
      actions: {
        addLiq: '添加流动性<br> {detail}',
        remove: '移除流动性<br> {detail}',
        stake: '质押',
        withdraw: '提现',
        claim: '领取',
        stake_lp: '质押 {value} {symbol}',
        withdraw_lp: '提现 {value} {symbol}',
        claim_lp: '领取 {value} {symbol}',
        vest_lp: '转投 {value} {symbol}',
        claim_all: '领取 {value1} {symbol1} 和 {value2} {symbol2}',
        lock_lp: '质押锁定 {value} {symbol}',
      },
      stakeeps: {
        info:
          '在下方质押代币，开始赚取手续费和罚金。您转投中的 SUN 数量如下所示。',
        tokens: {
          title: '您的代币',
          sub_title: '您的 SUN',
          sub_title_ssp: '质押锁定 SUN',
          expired_token: '到期代币',
          available_withdraw: '可提现',
          available_withdraw_without_penalty: '可免罚金提现',
          claim_text: '领取',
          reward_text: '奖励',
          early_exit: '提前退出罚金为',
          claim_available: '领取无罚金部分',
          claim_with_penalty: '缴纳罚金并领取全部',
          tip_1: '您的SUN包括',
          tip_2: '① 转投的SUN',
          tip_3: '② 质押未锁定的SUN',
          tip_4: '③ 释放的SUN',
          tip_5: '奖励包括 ',
          tip_6: '① 通过质押锁定SUN获得的奖励',
          tip_7: '② 通过仅质押SUN获得的奖励',
          tip_8: '③ 通过转投SUN获得的奖励',
        },
        desc: {
          title: '关于转投和锁定',
          content_1: '质押LP收获的SUN可转投获取TUSD奖励；',
          content_2: '转投的SUN有2个月的转投期，提前退出将产生50%的罚金；',
          content_3:
            '参与质押锁定SUN的用户除获取TUSD奖励，还可获取以上罚金并可随时领取；',
          content_4:
            '平台以 UTC +0 时间统计的7天为一个周期，同一周期的转投或解锁将同时到期。',
          content_5: '要赚取他人的退出罚金，必须先质押锁定SUN；',
          content_6: '通过质押锁定SUN赚取的 SUN 不会被锁定。',
        },
        vesting_table: {
          title: '转投的SUN',
          amount: '数额',
          penalty: '提前退出罚金',
          expiry: '到期日',
        },
        locked_table: {
          title: '已锁定的SUN',
          amount: '数额',
          expiry: '到期日',
          header: '已锁定 {symbol}',
        },
        lock: {
          title: '质押锁定池',
          sub_title: '质押锁定',
          sub_title_ssp: '质押锁定 SUN',
          deposit_text: '存款',
          available_balance: '可用余额',
          desc: '赚取质押手续费及罚金（需锁定2个月）',
          claim_text: '领取',
        },
        stake: {
          header: '质押池（无需锁定）',
          title: '质押 SUN',
          desc: '赚取质押手续费（无需锁定）',
          ssp_pool: 'SUN 矿池',
          total_locked: '总锁定量',
        },
        status: '转投和锁定代币数据',
      },
      sell_btn: '卖出',
      cancel: '取消',
      banner: {
        title_1: '兑换',
        desc_1: '即刻开启安全低滑点稳定币兑换',
        title_2: '质押并收获',
        desc_2: '质押LP代币轻松收获SUN',
        title_3: 'DAO',
        desc_3: '锁定 TRX 赚取罚金并为 LP 矿池投票',
        title_4: 'SUN 质押池',
        desc_4: '单币质押多重收益',
        title_5: '空投计划',
        desc_5: 'veCRV持有者，每周瓜分SUN空投',
        title_6: '3pool 兑换',
        title_home: 'SUN',
        desc_home: 'TRON首家集稳定币兑换、质押挖矿及自治一体化平台',
        title_deposit: '添加流动性',
        desc_deposit: '灵活操作，赚取用户流动性收益',
        title_withdraw: '移除流动性',
        desc_withdraw: '随时退出，支持多种提币方式',
        audit1: 'SUN 智能合约已通过SlowMist审核。',
        audit2: '检查审核报告。',
      },
      risks: {
        title_1: 'SUN 使用风险',
        content_1:
          '提供流动性包含一定风险。 在开始存款前，我们建议您先调研并了解其中涉及的风险。',
        title_2: '审计',
        content_2_1: 'SUN 智能合约已通过SlowMist审核。',
        content_2_2:
          '然而，安全审计并不能完全消除风险。 请勿将您的毕生积蓄或您无力承担损失的资产全部投入 SUN，尤其是用于提供流动性。',
        content_2_3:
          '将 SUN 作为交易平台使用的风险相对较低，但这并不构成官方建议。',
        title_3: '管理员密钥',
        content_3: 'SUN 完全去中心化，管理员无法接触到资金。',
        title_4: '永久脱锚',
        content_4:
          '如果兑换池中某一稳定币汇率显著低于 1.0 的锚定汇率，且之后不再重新锚定，即意味着该池的流动性提供者所持流动性几乎全部集中于该币。',
      },
      dao: {
        pool: {
          title: 'LP矿池权重',
          content_1:
            '当前LP矿池的SUN产出权重如下所示，由截止上周日24点（UTC+8）的各矿池投票累计数量计算得出。用户可以在下方的操作栏锁定TRX进行投票来提高某一个矿池的权重，同时还可获得SUN的罚金奖励。',
          content_2:
            '用户锁定TRX所投出的选票数量=锁定时TRX的美元价值*锁定的TRX数量。',
          content_3:
            '矿池的权重每周调整一次，本周用户投出的票，将在第二周周一0点（UTC+8）汇总到累计投票，计算得出第二周的矿池权重。',
        },
        lockvote: {
          title: '锁定 TRX 并投票',
          subtitle: 'Vote for',
          tip:
            '当你锁定TRX时，可获得罚金奖励，同时将获得一定数量的选票（投票数量=TRX美元价值*锁仓TRX数量）。你可以选择以下LP中的任意一个进行投票，锁仓的同时会投出对应的选票数。',
          deposit_text: '存款',
          lock_vote: '锁定并投票',
          available_balance: '可用余额',
        },
        table: {
          title: '矿池投票数据',
          total_lastweek: '上周总投票数',
          total: '累计总投票数(截止上周日)',
          pool_name: '矿池名称',
          total_amount: '累计投票数(截止上周日)',
          lastweek_amount: '上周投票数',
        },
      },
      notification: {
        tip1: '兑换 {fromValue} {fromToken} 为 {toValue} {toToken}',
      },
      daily_stats: {
        daily_apy: '每日APY及交易额',
        total_volume: '总交易额',
        trading_fees: '交易手续费',
      },
      volume_percoin: {
        last_week: '上周各币种交易额占比',
        total_volume: '{value} 每日总交易额',
        select: '选择',
      },
      century: {
        tip1: '<b>{value}X</b> 赚取',
        h: '时',
        m: '分',
        s: '秒',
      },
      countdown: {
        title: '世纪挖矿 即将开始',
        desc: '参与牛年世纪挖矿，躺赚波场代币礼包',
      },
    };
    const header = [
      { k: 'key', v: 'key' },
      { k: 'zhcn', v: '中文' },
      { k: 'enus', v: '英文' },
    ];
    var list = [];
    var find = (index, parentKye, data, enUsData) => {
      // 深层
      if (typeof data == 'object') {
        for (let key in data) {
          find(index + 1, parentKye + '.' + key, data[key], enUsData[key]);
        }
      }
      //插入
      if (typeof data == 'string') {
        list.push({
          key: parentKye,
          zhcn: data,
          enus: enUsData,
        });
      }
    };
    for (let key in zhCn) {
      find(1, key, zhCn[key], enUs[key]);
    }
    const fileName = '国际化.xlsm';
    exportExcel(header, list, fileName);
  };

  render() {
    return (
      <div className={styles.page}>
        <Button
          type="primary"
          onClick={() => {
            this.exportDefaultExcel();
          }}
        >
          导出
        </Button>
      </div>
    );
  }
}
